package com.example.qx.lei;

import java.util.ArrayList;
import java.util.List;

public class shudu {
    private static  shudu instance;
    private List<Float> sj=new ArrayList<>();
    private double a=0,b=0;
    private shudu (){
        sj.add((Float) 0F);

    }
    public  static synchronized shudu instance(){
        if(instance==null)
            instance=new shudu();
        return instance;

    }
    public void add(Float a){
        sj.add(a);
    }

    public void delete(){
        sj=new ArrayList<>();
        sj.add((Float) 0F);
    }
    public List<Float> getSj(){
        return sj;
    }

    public double[] getjw(){
        double [] c=new double[2];
         c[0]=a;
         c[1]=b;
         return c;
    }
    public void setjw(double c,double d){
        a=c;
        b=d;

    }
}
